package app.purchase.a571xz.com.myandroidframe.business.login;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;

import app.purchase.a571xz.com.myandroidframe.R;
import app.purchase.a571xz.com.myandroidframe.base.BaseActivity;
import app.purchase.a571xz.com.myandroidframe.utils.ToastUtil;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * A login screen that offers login via email/password.
 */
public class LoginActivity extends BaseActivity<LoginPresenter> implements LoginContact.ILoginView {


    @Override
    protected int getContentLayout() {
        return R.layout.activity_login;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        setStatusBarFontIconDark(true);
        ToastUtil.init(this);
        mPresenter = new LoginPresenter(this);
    }

    @Override
    protected void initData(Bundle savedInstanceState) {

    }

    @Override
    protected void initEvent() {

    }

    @Override
    public boolean isNeedTouchListen() {
        return false;
    }

    @Override
    public void uApp_EventStatisticStart() {

    }

    @Override
    public void uApp_EventStatisticEnd() {

    }

    @Override
    public boolean isUseEventBus() {
        return false;
    }

    @Override
    public boolean isUseFragment() {
        return true;
    }

    @Override
    public void showLoading() {

    }

    @Override
    public void hideLoading() {

    }

    @Override
    public void showMessage(String message) {
        ToastUtil.show(message);
    }

    @Override
    public void launchActivity(Intent intent) {

    }

    @Override
    public void killMyself() {

    }

    @Override
    public Context getContext() {
        return this;
    }

    @OnClick(R.id.email_sign_in_button)
    public void onViewClicked() {
        mPresenter.login("1234567890","123456");
    }
}

